package com.lgx.mall.view.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.lgx.mall.core.entity.Product;


/**
 * 热门商品排行
 * 
 * @author hz
 *
 */
@Entity
@Table(name="V_HOTPRODUCT")
public class HotProduct implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -9049536292319161395L;

	@Id
	@ManyToOne
	@JoinColumn(name = "product_id")
	private Product product;
	
	private int total;
	
	@Transient
	private Date date;

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
}
